package com.spddr.pmos.jpa;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import cn.seqdata.jpa.JpaNoGeneratedObject;

@Entity
@Table(name="monthplan_for_plant")
public class MonthPlanForPlant extends JpaNoGeneratedObject{
	private static final long serialVersionUID = 1L;
	
	private String year;
	private Double value;
	private Plant plant;
	
	@Column(name="year")
	public String getYear() {
		return year;
	}
	public void setYear(String year) {
		this.year = year;
	}
	@Column(name="value")
	public Double getValue() {
		return value;
	}
	public void setValue(Double value) {
		this.value = value;
	}
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "plant")
	@JsonSerialize(using = cn.seqdata.jackson.ObjectSerializer.IdName.class)
	public Plant getPlant() {
		return plant;
	}
	public void setPlant(Plant plant) {
		this.plant = plant;
	}
	
}
